home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 34.zip / BS1 part 34 / FredFish PD 314.adf / Zc / ReadME < prev    next >
Text File  |  1990-02-05  |  5KB  |  130 lines

  1.     Amiga Sozobon-C v1.01 - 13 June 1989.
  2.     Bug reports to jlydiatt@jlami.wimsey.bc.ca (Jeff Lydiatt)
  3.  
  4. This is a full port of the Sozobon-C compiler from the Atari St version,
  5. including a freely redistributable C library.
  6.  
  7. Implementation Notes:
  8.  
  9. The Sozobon-C compiler:
  10. -----------------------
  11.  
  12. Sozobon-C appears to be a fairly complete K&R compatible C compiler written
  13. by Johann Ruegg now running on the Atari ST.  Joe Montgomery subsequently
  14. revised it to generate assembler code compatible with Charlie Gibb's A68k
  15. compiler.  I have subsequently modified it for 4 byte integers, fixed a few
  16. bugs, and cleaned up the output a little.  I made no extensions to the
  17. compiler other than to have it recognize the universal pointer (void *).
  18.  
  19.  
  20. Coalescing Hunks:
  21. -----------------
  22.  
  23. The sozobon compiler freely intersperses code, data, and bss hunks
  24. when it generates the assembler file.  This is handled without complaint by
  25. the A68k assembler, but the hunks generated by A68k can give the linker,
  26. blink, some problems.  Typical symptoms are that the program blink
  27. generates is not runnable.  Occasionally, blink will run off the rails
  28. while processing these files.  Can you say Guru?  I knew you could! 
  29.  
  30. As a temporary fix for this problem, I have implemented a coalesce function
  31. in the optimizer phase.  For this reason, cc always invokes the optimizer
  32. using  the  lowest  level  of  optimization  possible.  If you want the
  33. full optimization, you must specify the -O option in cc.
  34.  
  35.  
  36. The optimizer.
  37. --------------
  38.  
  39. The optimizer seems to be pretty reliable and does some pretty significant
  40. optimizations to boot.  My hat's off to Tony Andrews for the super job he
  41. did in writing it.  Implementing the optimizer cut the ZC.lib library by
  42. about 7K for example.  The optimizer can take significant time however,
  43. particulary in large programs.  I have also noticed it to be slower than it
  44. should on small programs that have switch statements with a lot of case
  45. statements too.  You will occasionally have to be prepared to be paitent.
  46.  
  47.  
  48. Ami.lib.
  49. --------
  50.  
  51. Ami.lib is a version of Amiga.lib which contains all the glue routines to
  52. the Amiga's libraries.  I generated the assembler source code for it from
  53. .fd files that AmigaBASIC uses, and then passed it through Charlie's
  54. assembler.  A few routines are missing and are hand coded.  I think Ami.lib
  55. should be freely redistributable, but I've included the source and binaries
  56. for the program I used to generate the library anyway.
  57.  
  58.  
  59. CC
  60. --
  61.  
  62. CC is a front end that makes it easier to compile, assemble and link
  63. programs without a lot of typing.  For example to compile a simple hello
  64. world program called hello.c,  all you need to do is type "cc hello.c".
  65.  
  66. CC is a adapted from Fred Fish's cc on Fred Fish #2 to recognize the syntax
  67. for Sozobon-C, the optimizer, A68k and Blink.  CC also uses a replacement
  68. for Manx's fexecv() that fixes a bug in the manx version so the return code
  69. is passed back to the caller.  Ralph Babel did most of the work in the
  70. assembler subroutine System0.asm.  I wrote the interface code to search all
  71. directories specified by the path command and load the command via
  72. LoadSeg().
  73.  
  74.  
  75. MAKE
  76. ----
  77.  
  78. This program is the public domain Make program which appeared on usenet
  79. mod.sources, Volume 7, number 91.  Steve Walton ported it to the Amiga
  80. under Manx Aztec C version 3.40a.  The documentation assumes you know Make,
  81. and simply points out the Amiga specific features of the program.
  82.  
  83.  
  84. The support library.
  85. --------------------
  86.  
  87. The support library is Dale Schumacher's "dlibs.libs" which I have
  88. converted to work on the Amiga.  It was no small task, and is still not
  89. yet  fully  ported.  Feel free to fix that:-) 
  90.  
  91. You will find the functions that are implemented are a useful subset
  92. comprising 90% or so of the commonly used library routines.  I used the
  93. motorola fast floating point library to implement the floating point
  94. functions though, rather than use the assembler routines in dlibs.
  95.  
  96. A note about error codes.  Dale mentions in his documentation that
  97. all functions return negative values on error.  The amiga version 
  98. can generate positive errors on error returns from AmigaDos.  If the global
  99. variable errno has a positive value, it's probably an error return from
  100. AmigaDos using the IoErr() function.  The perror() funtion does not yet
  101. recognize AmigaDos errors. 
  102.  
  103.  
  104. C Header files in "include".
  105. ------------------------------
  106.  
  107. The header files in include contain all the standard c header files like
  108. "stdio.h" that go with the ZC.lib library.  If however, you want to take
  109. advantage of the superb graphics in the amigia, you will also require the
  110. include files supplied by commodore that describe the layout of important
  111. data structures in the Amiga's operating system.  These are normally
  112. supplied with the commercial compliers, but since this is a PD effort, you
  113. are out of luck.  If you already have Lattice C or Aztec C on the Amiga,
  114. you may be able to use the include files from those compilers.  If not, the
  115. include files are available from commodore for a nominal $20 fee.  Write
  116. to:
  117.  
  118.         Commodore Business Machines
  119.         Software Department
  120.         1200 Wilson Drive
  121.         West Chester, PA 19380
  122.  
  123. Ask for the "AmigaDos 1.3 Native Developer Upgrade".  The kit contains all
  124. the assembler and C include files, the libraries, autodocs, readme files,
  125. alink, and the library offsets.  It comes on 3 or 4 disks - well worth the
  126. $20.
  127.  
  128. Jeff Lydiatt.
  129. jlydiatt@jlami.wimsey.bc.ca
  130.